﻿using System.Text.RegularExpressions;

namespace Safover.LidarCollector.View
{
    internal static class TextExtensions
    {
        private static readonly Regex _regexDouble = new Regex(@"^(([0-9]*)|(([0-9]*)\.([0-9]*)))$");

        internal static bool IsTextNumeric(this string text)
        {
            return _regexDouble.IsMatch(text);
        }

        internal static bool IsTextInt(this string text)
        {
            return int.TryParse(text, out _);
        }

    }
}
